From c93712d65586e8abf6afd11164acf99167ee2dca Mon Sep 17 00:00:00 2001 From: Christian Limpach Date: Thu, 1 Mar 2007 17:28:31 +0000 Subject: [PATCH] [tools] Set guest address size to be the same as dom0 address size on restore. Signed-off-by: Christian Limpach --- tools/libxc/xc_linux_restore.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/libxc/xc_linux_restore.c b/tools/libxc/xc_linux_restore.c index 1c7ab23f75..9a8152bebc 100644 --- a/tools/libxc/xc_linux_restore.c +++ b/tools/libxc/xc_linux_restore.c @@ -192,6 +192,19 @@ int xc_linux_restore(int xc_handle, int io_fd, DPRINTF("xc_linux_restore start: max_pfn = %lx\n", max_pfn); + /* + * XXX For now, 32bit dom0's can only save/restore 32bit domUs + * on 64bit hypervisors. + */ + memset(&domctl, 0, sizeof(domctl)); + domctl.domain = dom; + domctl.cmd = XEN_DOMCTL_set_address_size; + domctl.u.address_size.size = sizeof(unsigned long) * 8; + rc = do_domctl(xc_handle, &domctl); + if ( rc != 0 ) { + ERROR("Unable to set guest address size."); + goto out; + } if(!get_platform_info(xc_handle, dom, &max_mfn, &hvirt_start, &pt_levels)) { -- 2.30.2